<?php

//配置项
$img_url     = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
$img_url_1   = $img_url .'frontend/em0131/em0131_marketdeal/images/landing-page/graduation-party/landing-page2_22.png';
$img_url_en  = $img_url . "frontend/em0131/em0131_marketdeal/images/landing-page/graduation-party/landing-page3_03.png";
$img_url_ru  = $img_url . "frontend/em0131/em0131_marketdeal/images/landing-page/graduation-party/landing-page2_01.png";
$language_img =(Mage::app()->getStore()->getStoreId() == '2')?$img_url_ru:$img_url_en;

/*参加活动产品*/
$product_sku = array (
    "gift" => array (
'755S00010_UM0ROMEXG',
'755S00010_HT000007B',
'852S00001_U1501',
'852S00001_HC02',
'852S00001_00006',
'852S00001_00007',
'852S00001_00008',
'852S00001_X1792',
'852S00001_X1066',
'852S00001_00014',
'852S00001_W1901',
    ),
    "boys" => array (
'579S00001_L3C06',
'579S00001_L6C02',
'579S00001_L5C05',
'579S00001_L5C1121-28',
'592S00001_CC63761',
'592S00001_CC64061',
'592S00001_KC12441',
'592S00001_K151753',
'592S00001_W125153',
'592S00001_W138053',
'592S00001_TC64353',
'010S00002_1076-112-C004',
'010S00002_BA0502-1',
'020S00009_DS1051',
'020S00009_DS61018',
'020S00002_350918-01',
'020S00002_350134-01',
'020S00002_190336-01',
'020S00002_190339-01',
'577S00002_HR-3162-male',
'577S00002_HR-8077',
'577S00002_HR-8072',
    ),
    "girls" => array (
'769S00007_150495',
'769S00007_150494',
'769S00007_150492',
'769S00007_140545',
'571S00002_LK0022',
'571S00002_LQ5918',
'769S00002_XD037',
'769S00002_YD035',
'769S00002_XD051',
'573S00001_2232',
'573S00001_928',
'769S00002_XP009',
'769S00002_XP005',
'769S00007_156053',
'010S00002_1170-92-D',
'010S00002_3590-2',
'010S00002_750-2',
'010S00002_H881A-H01-P349',
'010S00002_B1353-60',
'010S00002_B1356A-21-D',
'020S00002_070349-04',
'020S00002_1170412-01',
'020S00002_1170740-02L',
'020S00002_1170642-04',
'020S00002_1170798-01',
    ),
);
    $w = $this->getThumbnailWidth();
    $h = $this->getThumbnailHeight();

    
    $_columnCount = $this->getColumnCount();

 /* slider config */
    $idJs = "em_minifilter_products_".md5(uniqid(rand()));    
       if ($this->getData('slider_unique_id'))
        $idJs = $this->getData('slider_unique_id');
    $this->idJs = $idJs;



    if($this->getShowFrontend('gift')){
        $product_cation = $product_sku['gift'];
    }
    if($this->getShowFrontend('boys')){
        $product_cation = $product_sku['boys'];
    }
    if($this->getShowFrontend('girls')){
        $product_cation = $product_sku['girls'];
    }
?>

<script type="text/javascript">
//<![CDATA[
    (function($) {  
        $('.em-wrapper-main').css({"margin-top":"2rem","background":"url('<?php echo $language_img; ?>') repeat-x #c9f7fa","background-position":"center top"})
        $('.em-wrapper-main >div').css({"margin-top":"0","padding-top":"0"});
    })(jQuery); 
//]]>
</script>

<img style="position: absolute;bottom: 10%;right: -11%;display: block;width: 210px;z-index: 0;" src="<?php echo $img_url_1 ?>" alt="">
<img style="position: absolute;top: 10%;left: -11%;display: block;width: 165px;z-index: 0;" src="<?php echo $img_url_1 ?>" alt="">

<div id="<?php echo $idJs;?>" class="em-grid-23 <?php if($this->getCustomClass()): ?><?php echo $this->getCustomClass();?><?php endif; ?>">
<?php $i=0; foreach ($product_cation as $val): ?>
    <?php
        $_product = Mage::getModel('catalog/product')->loadByAttribute('sku', $val);
    ?>
    <?php if ($_product): ?>
        <div class="em-item-slider" style="width: <?php echo $w.'px'; ?>;display: inline-block;">
        <div class="products-grid">
        <div class="item first" style="width: 100%">
        <div class="product-item" style="position: relative;">
            <div class="product-shop-top">
                <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>" class="product-image ">
                    <img  class="em-alt-hover img-responsive" src="<?php echo Mage::helper('catalog/image')->init($_product, 'image')->resize($w); ?>" width="<?php echo $w; ?>" height="<?php echo $h ;?>" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" >
                    <img class="img-responsive em-alt-org" src="<?php echo Mage::helper('catalog/image')->init($_product, 'image')->resize($w); ?>" width="<?php echo $w; ?>" height="<?php echo $h ;?>" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" >
                </a>
                <div class="em-element-display-hover bottom">                                       
                    <?php if($this->getShowFrontend('addtocart') || $this->getShowFrontend('addto')): ?>
                        <?php if($this->getShowFrontend('addto')):?>
                            <ul class="add-to-links">
                                <?php if ($this->helper('wishlist')->isAllow()) : ?>
                                <li><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist" title="<?php echo $this->__('Add to Wishlist') ?>"><?php echo $this->__('Add to Wishlist') ?></a></li>
                                <?php endif; ?>
                                <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>

                                <li style="display:none"><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare" title="<?php echo $this->__('Add to Compare') ?>"><?php echo $this->__('Add to Compare') ?></a></li>
                                <?php endif; ?>
                            </ul>
                        <?php endif; ?>
                    <?php endif; ?>
                </div>
            </div>
            <div class="product-shop">
                <div class="f-fix">
                    <!--product name-->
                    <?php if ($this->getShowFrontend('name')):?>
                    <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></h3>
                    <?php endif;?>
                    <!--product reviews-->
                    <?php if ($this->getShowFrontend('review')):?>
                    <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
                    <?php endif ; ?>
                    <!--product price-->
                    <?php if ($this->getShowFrontend('price')):?>
                        <?php if (Mage::helper('catalog')->canApplyMsrp($_product)):?>
                            <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $this->__('Detail') ?></a>
                        <?php else : ?>
                            <?php echo $this->getPriceHtml($_product, true, "-emprice-".md5(uniqid(rand())) ) ?>
                        <?php endif;?>
                    <?php endif;?>
                    <!--Shop Now-->
                    <?php if($this->getShowFrontend('addtocart') || $this->getShowFrontend('addto')): ?>
                    <div class="em-btn-addto">
                        <a href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->__('Shop Now') ?></a>
                    </div>
                    <?php endif;?>
                </div>
            </div>
            <?php if(!$_product->isAvailable()): ?>
                <div class="page_instock"></div>
            <?php endif ?>
        </div>
        </div>
        </div>
        </div>
    <?php endif ?>
<?php endforeach ?>
</div>





